/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package sv.com.intesal.seguridad.sql;

/**
 *
 * @author JM
 */
public class SQLParametroFacturacion {

    public static final String insertParametroFacturacion = "INSERT INTO PARAMETRO_FACTURACION(iva,retencion,percepcion,valor_retencion,valor_percepcion,codigo_s)VALUES(?,?,?,?,?,?)";
    public static final String updateParametroFacturacion = "UPDATE PARAMETRO_FACTURACION SET iva=?, retencion=?,percepcion=?,valor_retencion=?,valor_percepcion=? where codigo_pf=?";
    public static final String getParametroFacturaciones = "SELECT * FROM PARAMETRO_FACTURACION as pf,SUCURSAL as s where s.codigo_s=pf.codigo_s order by nombre_s";
    public static final String getParametroFacturacion = "SELECT * FROM PARAMETRO_FACTURACION as pf,SUCURSAL as s where s.codigo_s=pf.codigo_s and pf.codigo_pf=? order by nombre_s";


   public static final String getParametroFacturacionSucursal = "SELECT * FROM PARAMETRO_FACTURACION as pf,SUCURSAL as s where s.codigo_s=pf.codigo_s and pf.codigo_s=? order by nombre_s";

    public static final String getCountSucursalParametroFacturacion="SELECT count(*) as count FROM PARAMETRO_FACTURACION as pf,SUCURSAL as s where s.codigo_s=pf.codigo_s and s.codigo_s=?";

    public static final String getMax="SELECT max(codigo_s) as max FROM SUCURSAL";
    public static final String getMaxPF="SELECT max(codigo_pf) as max FROM PARAMETRO_FACTURACION";
    public static final String getAllUsuarios_Formulario_Roles="SELECT codigo_u,nombre_u FROM USUARIO";
}
